import Link from 'next/link';
import Loading from './loading';
import { Suspense } from 'react'
export const metadata = {
  title: "股票系统",
  description: "这是一个股票系统",
};

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
      <Suspense fallback = {<Loading/>}>
        <div style={{ display: "flex" }}>
        <div style={{ 
  width: "10%",
  textAlign: 'center',
  backgroundColor: '#f5f5f5',
  padding: '20px',
  height: '100vh',
  borderRight: '1px solid #ccc',
}}>
  <div style={{ marginBottom: '15px' }}>
    <Link href="/sharesPage/home/sharesView" style={{ textDecoration: 'none', color: '#333', fontSize: '16px' }}>查看股票</Link>
  </div>
  <hr style={{ margin: '10px 0', border: '0.5px solid #ccc' }} /> {/* 添加分隔线 */}
  <div style={{ marginBottom: '15px' }}>
    <Link href="/sharesPage/home/sharesChats" style={{ textDecoration: 'none', color: '#333', fontSize: '16px' }}>指标计算与可视化</Link>
  </div>
  <hr style={{ margin: '10px 0', border: '0.5px solid #ccc' }} />
  <div style={{ marginBottom: '15px' }}>
    <Link href="/sharesPage/home/sharesOne" style={{ textDecoration: 'none', color: '#333', fontSize: '16px' }}>单只股票收盘趋势</Link>
  </div>
  <hr style={{ margin: '10px 0', border: '0.5px solid #ccc' }} />
  <div style={{ marginBottom: '15px' }}>
    <Link href="/sharesPage/home/sharesForecast" style={{ textDecoration: 'none', color: '#333', fontSize: '16px' }}>股票预测</Link>
  </div>
  <hr style={{ margin: '10px 0', border: '0.5px solid #ccc' }} />
  <div style={{ marginBottom: '15px' }}>
    <Link href="/sharesPage/home/sharesDaPan" style={{ textDecoration: 'none', color: '#333', fontSize: '16px' }}>大盘分析</Link>
  </div> 
  <hr style={{ margin: '10px 0', border: '0.5px solid #ccc' }} />
  
</div>


          <div style={{ width: "90%" }}>
          {children}
            </div>
        </div>
        </Suspense>  
      </body>
    </html>
  );
}
